package com.sinosoft.tcmcp.system.web.dto;

import com.sinosoft.framework.core.api.domain.GroupEntity;
import com.sinosoft.framework.core.common.utils.ajax.ObjectUtil;

/**
 * 群组信息传输类
 * @author shanwang
 *
 */
public class GroupData implements java.io.Serializable{

	private static final long serialVersionUID = 1L;
	
	private String id;	//	群组编号
	private String oid;	//	机构编号
	private String orgcode; //行政编码
	private String name;	//	群组名称
	private String pid;	//	父群组编号
	private String description;	//	描述
	private int sort;	//	排序
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getOid() {
		return oid;
	}
	public void setOid(String oid) {
		this.oid = oid;
	}
	public String getOrgcode() {
		return orgcode;
	}
	public void setOrgcode(String orgcode) {
		this.orgcode = orgcode;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPid() {
		return pid;
	}
	public void setPid(String pid) {
		this.pid = pid;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public int getSort() {
		return sort;
	}
	public void setSort(int sort) {
		this.sort = sort;
	}

	/**
	 * 数据转换
	 * 实体类转传输类
	 * @param groupEntity	群组信息实体
	 */
	public void toGroupData(GroupEntity groupEntity) {
		ObjectUtil.oldToNew(this, groupEntity, "serialVersionUID");
	}
	
	/**
	 * 数据转换
	 * 传输类转实体类
	 * @return	群组信息实体
	 */
	public GroupEntity toGroupEntity(){
		GroupEntity groupEntity = new GroupEntity();
		ObjectUtil.oldToNew(groupEntity, this, "serialVersionUID");
		return groupEntity;
	}
	
}
